import 'package:sow_app_core/src/entity/chapter.dart';
import 'package:test/test.dart';

import 'package:sow_app_mock/sow_app_mock.dart';

void main() {
  group('chapter detail controller test group', () {
    final MockChapterDetailPresenter presenter = MockChapterDetailPresenter();
    presenter.chapter = Chapter();
    final controller = MockChapterDetailController(presenter);
    test("should execute normal when invoke getChapterContent", () async {
      await controller.getChapterContent();
      await Future.doWhile(() => presenter.flag = false);
      expect(controller.presenter.chapter, isNotNull);
    });
  });
}
